(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
or(true, y) → true
or(x, true) → true
or(false, false) → false
mem(x, nil) → false
mem(x, set(y)) → =(x, y)
mem(x, union(y, z)) → or(mem(x, y), mem(x, z))
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
mem(x, union(y, z)) →+ or(mem(x, y), mem(x, z))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [y / union(y, z)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
or(true, y) → true
or(x, true) → true
or(false, false) → false
mem(x, nil) → false
mem(x, set(y)) → ='(x, y)
mem(x, union(y, z)) → or(mem(x, y), mem(x, z))
S is empty.
Rewrite Strategy: FULL
(5) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
mem/0
set/0
='/0
='/1
(6) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
or(true, y) → true
or(x, true) → true
or(false, false) → false
mem(nil) → false
mem(set) → ='
mem(union(y, z)) → or(mem(y), mem(z))
S is empty.
Rewrite Strategy: FULL
(7) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(8) Obligation:
TRS:
Rules:
or(true, y) → true
or(x, true) → true
or(false, false) → false
mem(nil) → false
mem(set) → ='
mem(union(y, z)) → or(mem(y), mem(z))
Types:
or :: true:false:=' → true:false:=' → true:false:='
true :: true:false:='
false :: true:false:='
mem :: nil:set:union → true:false:='
nil :: nil:set:union
set :: nil:set:union
=' :: true:false:='
union :: nil:set:union → nil:set:union → nil:set:union
hole_true:false:='1_0 :: true:false:='
hole_nil:set:union2_0 :: nil:set:union
gen_nil:set:union3_0 :: Nat → nil:set:union
(9) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
mem
(10) Obligation:
TRS:
Rules:
or(
true,
y) →
trueor(
x,
true) →
trueor(
false,
false) →
falsemem(
nil) →
falsemem(
set) →
='mem(
union(
y,
z)) →
or(
mem(
y),
mem(
z))
Types:
or :: true:false:=' → true:false:=' → true:false:='
true :: true:false:='
false :: true:false:='
mem :: nil:set:union → true:false:='
nil :: nil:set:union
set :: nil:set:union
=' :: true:false:='
union :: nil:set:union → nil:set:union → nil:set:union
hole_true:false:='1_0 :: true:false:='
hole_nil:set:union2_0 :: nil:set:union
gen_nil:set:union3_0 :: Nat → nil:set:union
Generator Equations:
gen_nil:set:union3_0(0) ⇔ nil
gen_nil:set:union3_0(+(x, 1)) ⇔ union(nil, gen_nil:set:union3_0(x))
The following defined symbols remain to be analysed:
mem
(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
mem(
gen_nil:set:union3_0(
n5_0)) →
false, rt ∈ Ω(1 + n5
0)
Induction Base:
mem(gen_nil:set:union3_0(0)) →RΩ(1)
false
Induction Step:
mem(gen_nil:set:union3_0(+(n5_0, 1))) →RΩ(1)
or(mem(nil), mem(gen_nil:set:union3_0(n5_0))) →RΩ(1)
or(false, mem(gen_nil:set:union3_0(n5_0))) →IH
or(false, false) →RΩ(1)
false
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(12) Complex Obligation (BEST)
(13) Obligation:
TRS:
Rules:
or(
true,
y) →
trueor(
x,
true) →
trueor(
false,
false) →
falsemem(
nil) →
falsemem(
set) →
='mem(
union(
y,
z)) →
or(
mem(
y),
mem(
z))
Types:
or :: true:false:=' → true:false:=' → true:false:='
true :: true:false:='
false :: true:false:='
mem :: nil:set:union → true:false:='
nil :: nil:set:union
set :: nil:set:union
=' :: true:false:='
union :: nil:set:union → nil:set:union → nil:set:union
hole_true:false:='1_0 :: true:false:='
hole_nil:set:union2_0 :: nil:set:union
gen_nil:set:union3_0 :: Nat → nil:set:union
Lemmas:
mem(gen_nil:set:union3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
Generator Equations:
gen_nil:set:union3_0(0) ⇔ nil
gen_nil:set:union3_0(+(x, 1)) ⇔ union(nil, gen_nil:set:union3_0(x))
No more defined symbols left to analyse.
(14) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
mem(gen_nil:set:union3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
(15) BOUNDS(n^1, INF)
(16) Obligation:
TRS:
Rules:
or(
true,
y) →
trueor(
x,
true) →
trueor(
false,
false) →
falsemem(
nil) →
falsemem(
set) →
='mem(
union(
y,
z)) →
or(
mem(
y),
mem(
z))
Types:
or :: true:false:=' → true:false:=' → true:false:='
true :: true:false:='
false :: true:false:='
mem :: nil:set:union → true:false:='
nil :: nil:set:union
set :: nil:set:union
=' :: true:false:='
union :: nil:set:union → nil:set:union → nil:set:union
hole_true:false:='1_0 :: true:false:='
hole_nil:set:union2_0 :: nil:set:union
gen_nil:set:union3_0 :: Nat → nil:set:union
Lemmas:
mem(gen_nil:set:union3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
Generator Equations:
gen_nil:set:union3_0(0) ⇔ nil
gen_nil:set:union3_0(+(x, 1)) ⇔ union(nil, gen_nil:set:union3_0(x))
No more defined symbols left to analyse.
(17) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
mem(gen_nil:set:union3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
(18) BOUNDS(n^1, INF)